<template>
	<view>
		<view class="header">
			我的账户
		</view>
		<view class="walletcard">
			<view class="commen">
				<view class="total">
					总收入
				</view>
				<view class="price">
					{{walletInfo.awrMoney}}
				</view>
				<view class="box mt-4">
					<view class="money">
						<view class="">
							本月收入(元)
						</view>
						<view class="">
							{{walletInfo.mothMoney}}
						</view>
					</view>
					<view class="money ml-5">
						<view class="">
							账户余额(元)
						</view>
						<view class="">
							{{walletInfo.money}}
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="walletlist box d-ai-c d-jc-sb" @tap="opendetail">
			<view class="" >
				余额明细
			</view>
			<image src="https://xb-street.oss-cn-shanghai.aliyuncs.com/xb-doctor-manage/static/images/tiaozhuan.png" mode=""></image>
		</view>
		<view class="walletlist box d-ai-c d-jc-sb"@tap="opencash(walletInfo.money)">
			<view class="">
				我要提现
			</view>
			<image src="https://xb-street.oss-cn-shanghai.aliyuncs.com/xb-doctor-manage/static/images/tiaozhuan.png" mode=""></image>
		</view>
		<orange-fullloading textcolor="#4CA6FF" textsize="30" :loadshow="loadshow" text="加载中"></orange-fullloading>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				walletInfo:'',
				loadshow:true,
			
			}
		},
		onLoad() {
			// this.loadshow = false
			this.walletdetails()
		},
		onShow() {
			this.walletdetails()
		},
		methods: {
			opencash(money){
				uni.navigateTo({
					url:'withdrawdeposit?money='+money
				})
			},
			opendetail(){
				uni.navigateTo({
					url:'cashdetail'
				})
			},
			walletdetails(){
			    this.$api.walletdetails().then((res) => {
					if(res.data.success){
						this.loadshow = false
						this.walletInfo = res.data.dataMap
						
					}else{
						uni.showToast({
							title:res.data.message,
							duration:1000,
							icon:'none'
						})
					}
							
				})
			},
		}
	}
</script>

<style lang="less" scoped>
.header{
	font-size: 40rpx;
	font-weight: bold;
	color: #333333;
	padding-top: 40rpx;
	padding-left: 30rpx;
}
.walletcard{
	width: 721rpx;
	height: 360rpx;
	background: url(https://xb-street.oss-cn-shanghai.aliyuncs.com/xb-doctor-manage/static/images/kapian@2x.png) no-repeat;
	background-size: cover;
	margin: 0 auto;
	overflow: hidden;
	.commen{
		width: 630rpx;
		height: 240rpx;
		padding: 30rpx;
		// border:1px solid red;
		margin: 0 auto;
		margin-top: 30rpx;
		.total{
		font-size: 28rpx;
		font-weight: 500;
		color: #512B0A;
	  }
	  .price{
		  font-size: 52rpx;
		  font-weight: bold;
		  color: #512B0A;
	  }
	  .money{
		  view:nth-child(1){
			  font-size: 28rpx;
			  font-weight: 500;
			  color: #512B0A;
		  }
		  view:nth-child(2){
			font-size: 30rpx;
			font-weight: bold;
			color: #512B0A;
		  }
	  }
	}
	
}
.walletlist{
	width: 610rpx;
	height: 120rpx;
	padding: 0 70rpx;
	view:nth-child(1){
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
	}
	image{
		width: 30rpx;
		height: 28rpx;
	}
}
</style>
